- page_title "群组"
%h3.page-title
  群组 (#{number_with_delimiter(@groups.total_count)})

%p.light
  群组用于管理有组织的关联项目。

.top-area
  .nav-search
    = form_tag admin_groups_path, method: :get, class: 'form-inline' do
      = hidden_field_tag :sort, @sort
      = text_field_tag :name, params[:name], class: "form-control"
      = button_tag "搜索", class: "btn submit btn-primary"

  .nav-controls
    .dropdown.inline
      %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
        %span.light
        - if @sort.present?
          = sort_options_hash[@sort]
        - else
          = sort_title_recently_created
        %b.caret
      %ul.dropdown-menu
        %li
          = link_to admin_groups_path(sort: sort_value_recently_created) do
            = sort_title_recently_created
          = link_to admin_groups_path(sort: sort_value_oldest_created) do
            = sort_title_oldest_created
          = link_to admin_groups_path(sort: sort_value_recently_updated) do
            = sort_title_recently_updated
          = link_to admin_groups_path(sort: sort_value_oldest_updated) do
            = sort_title_oldest_updated
    = link_to '新群组', new_admin_group_path, class: "btn btn-new"

%ul.content-list
  - @groups.each do |group|
    = render 'group', group: group

= paginate @groups, theme: "gitlab"
